<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>李佳音的Python进阶作业1</title>
</head>
<body>
<pre>
from time import sleep
class Person:
    '''Person类'''
    def __init__(self,name,age):
        self.name = name
        self.age = age

    def speak(self):
        print("我是%s,今年%s岁了。"%(self.name,self.age))
class Student(Person):
    '''Student类'''
    def __init__(self, name, age, school, my_id):
        super(Student, self).__init__(name, age)
        self.school = school
        self.my_id = my_id

    def speak(self):
        print("我是%s，今年%s岁了，我来自%s，学号是%d。"%(self.name, self.age, self.school, self.my_id))

    def run(self, v, times):
        s = v*times
        print("我%s分钟可以跑%s米。"%(times, s))
        return s

class CollegeStudent(Student):
    def __init__(self, name, age, school, my_id, language):
        super(CollegeStudent, self).__init__(name, age, school, my_id)
        self.language = language

    def speak(self):
        print("我是%s，今年%s岁了，我来自%s，学号是%d，我会%s。" %(self.name, self.age, self.school, self.my_id, self.language))

    def coding(self):
        print("I am coding",end = " ")
        for i in range(10):
            print(".",end="")
            sleep(1)
x = CollegeStudent("Jack", 18, "Blueking", 200101, "English")
x.speak()
x.run(200,4)
x.coding()

</pre>
</body>
</html>